package com.wc.controller;

import com.wc.pojo.Project;
import com.wc.service.ProjectService;
import com.wc.tree.TreeNode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 树形结构控制层
 */
@RestController
public class TreeController {

    @Autowired
    private ProjectService service;

    @RequestMapping("getTree")
    public List<TreeNode> getTree(){
        return service.getTree();
    }

    @RequestMapping("getTreeType")
    public List<Project> getTreeType(){
        return service.getTreeType();
    }

}
